#ifndef __RINGBUF_H
#define __RINGBUF_H

#include <stdint.h>
#include <stdbool.h>

typedef struct 
{
    uint8_t *buf;
    uint32_t read;
    uint32_t write;
    uint32_t buflen;
}RINGBUF_CTRL_S;

void initRingBuf(RINGBUF_CTRL_S *ringbufctrl, uint8_t *buf, uint32_t len);
void deinitRingBuf(RINGBUF_CTRL_S *ringbufctrl);
int8_t pushRingBuf(RINGBUF_CTRL_S *ringbufctrl, uint8_t buf);
int8_t popRingBuf(RINGBUF_CTRL_S *ringbufctrl, uint8_t *buf);
#endif
